<div class="col-xs-3">
                <div class="profile-sidebar">
                    <div class="profile-box">
                        <div class="profile-avator">
                            <img src="/Public/themes/images/img-people.png" />
                        </div>
                        <div class="profile-name">{$theirinfo.nickname}</div>
                    </div>
                    <notempty name="theirinfo.teamname">
                        <div class="text-center">
                            所在团队：<strong class="text-success">{$theirinfo.teamname}</strong>
                        </div>
                    </notempty>
                    <div class="profile-section">
                        <div class="profile-section-title text-center">
                            <a href="javascript:void(0);" class="link-olive" id="btnSendRequest">
                                抛橄榄枝
                                <img src="/Public/themes/images/img-olive.png" alt="" />
                            </a>
                            <!--归宿：般若虾-->
                        </div>
                    </div>

                    <div class="profile-section">
                        <div class="profile-section-title">
                            <ul>
                                <li  class="active"><a href="#tabEmployer"role="tab" data-toggle="tab">雇主评价</a></li>
                                 <li><a href="#tabEmployee" role="tab" data-toggle="tab">人才评价</a></li>
                            </ul>
                        </div>
                        <div class="tab-feedback-content">
                            
                     
                        <div role="tabpanel" id="tabEmployer"  class="tab-feedback-panel active">
                            <div class="profile-section-content">
                            <ul>
                                <li>
                                    <strong>好 评 率：</strong>&nbsp;<span class="text-orange">{$wellrate}%</span>
                                </li>
                                <li class="star-line">
                                    <strong>工作态度：</strong>&nbsp;
                                    <div class="star-panel" data-score="{$ratearr['avg1']|score2rate}"></div>
                                    &nbsp;<span>{$ratearr['avg1']|score2rate}</span>
                                </li>
                                <li class="star-line">
                                    <strong>专业能力：</strong>&nbsp;
                                    <div class="star-panel" data-score="{$ratearr['avg2']|score2rate}"></div>
                                    &nbsp;<span>{$ratearr['avg2']|score2rate}</span>
                                </li>
                                <li class="star-line">
                                    <strong>工作效率：</strong>&nbsp;
                                    <div class="star-panel" data-score="{$ratearr['avg3']|score2rate}"></div>
                                    &nbsp;<span>{$ratearr['avg3']|score2rate}</span>
                                </li>
                                <li class="star-line">
                                    <strong>沟通能力：</strong>&nbsp;
                                    <div class="star-panel" data-score="{$ratearr['avg4']|score2rate}"></div>
                                    &nbsp;<span>{$ratearr['avg4']|score2rate}</span>
                                </li>
                            </ul>
                                </div>
                        </div>
                        <div role="tabpanel" id="tabEmployee" class="tab-feedback-panel">
                             <div class="profile-section-content">
                            <ul>
                                <li>
                                    <strong>好 评 率：</strong>&nbsp;<span class="text-orange">{$wellrate}%</span>
                                </li>
                                <li class="star-line">
                                    <strong>雇佣待遇：</strong>&nbsp;
                                    <div class="star-panel" data-score="{$ratearr['avg1']|score2rate}"></div>
                                    &nbsp;<span>{$ratearr['avg1']|score2rate}</span>
                                </li>
                                <li class="star-line">
                                    <strong>薪酬能力：</strong>&nbsp;
                                    <div class="star-panel" data-score="{$ratearr['avg2']|score2rate}"></div>
                                    &nbsp;<span>{$ratearr['avg2']|score2rate}</span>
                                </li>
                                <li class="star-line">
                                    <strong>领导能力：</strong>&nbsp;
                                    <div class="star-panel" data-score="{$ratearr['avg3']|score2rate}"></div>
                                    &nbsp;<span>{$ratearr['avg3']|score2rate}</span>
                                </li>
                                <li class="star-line">
                                    <strong>验收速度：</strong>&nbsp;
                                    <div class="star-panel" data-score="{$ratearr['avg4']|score2rate}"></div>
                                    &nbsp;<span>{$ratearr['avg4']|score2rate}</span>
                                </li>
                            </ul>
                             </div>
                        </div>
                               </div>
                    </div>
                    <div class="profile-section">
                        <div class="profile-section-title">
                            联系方式
                        </div>
                        <div class="profile-section-content">
                            电话：<empty name="theirinfo.mobile">未填写<else />{$theirinfo.mobile}</empty><br />
                            微博：<empty name="theirinfo.weibo">未填写<else />{$theirinfo.weibo|textFilter=###,1}</empty><br />
                            博客：<empty name="theirinfo.blog">未填写<else />{$theirinfo.blog|textFilter=###,1}</empty><br />
                        </div>
                    </div>
                </div>
            </div>

<script type="text/x-kendo-template" id="tplInvite">
        <div class="form-inline">
            <div class="form-group text-center">
                您要邀请这名小伙伴加入哪个职位？
                <br /><br />
                <select id="ddlPost" class="form-control" style="width: 120px;">
                    <option value="">选择职位</option>
                <volist name="jobs" id="job">
                    <option value="{$job.id}">{$job.name}</option>
                </volist>
                </select>
                <p style="color:#f00;display:none;" id="inviteNotice"></p>
                <br /><br />
            </div>
        </div>
    </script>
    <script type="text/javascript">
        requirejs(["jquery"], function () {
            $(function () {
                $(".star-panel").each(function () {
                    var total = 5;
                    var container = $(this);
                    var score = container.data("score");

                    var s1 = Math.floor(score);
                    var s2 = Math.ceil(score);
                    console.log(s1);
                    for (var i = 0; i < s1; i++) {
                        container.append("<span class='fa fa-star'></span>");
                    }
                    if (score - s1 > 0) {
                        container.append("<span class='fa fa-star-half-o'></span>");
                    }

                    for (var i = 0; i < total - s2; i++) {
                        container.append("<span class='fa fa-star-o'></span>");
                    }
                });
            });
        });
    </script>
    <if condition="$me elt 0">
    <script type="text/javascript">
        require(["jquery", "modules/message"], function () {
            $("#btnSendRequest").click(function () {
                $.fancybox.open("#loginbox_global", { autoSize: true, padding: 0, closeBtn: false });
            });
        });
    </script>
    <else />
    <script type="text/javascript">
        require(["jquery", "modules/message"], function ($, messageBox) {
            var invitauth = parseInt("{$iflag}");
            function sendInvitation() {
                $('#inviteNotice').hide();
                var post = $("#ddlPost option:selected").val();
                if(post==''){
                    $('#inviteNotice').text('请选择职位');
                    $('#inviteNotice').show();
                    return false;
                }
                var uid = parseInt("{$theirinfo.uid}");
                var uname = '{$theirinfo.nickname}';

                $.ajax({
                    type: "get",
                    async: false,
                    url: "{:U('Team/invitjoin_ajax@'.getDomain(), '', '')}-targetuid-"+uid+"-jobid-"+post+"-uname-"+uname,
                    dataType: "jsonp",
                    jsonp: "callback",//传递给请求处理程序或页面的，用以获得jsonp回调函数名的参数名(一般默认为:callback)
                    jsonpCallback:"callme",//自定义的jsonp回调函数名称，默认为jQuery自动生成的随机函数名，也可以写"?"，jQuery会自动为你处理数据
                    success: function(data){
                        messageBox.alert({content: data.msg});
                    },
                    error: function(){
                        messageBox.alert({content:"发送邀请失败!"});
                    }
                });
            }

            $("#btnSendRequest").click(function () {
                if (invitauth == 0) {
                    messageBox.alert({
                        title: "邀请加入",
                        contentId: "#tplInvite",
                        sureText: "发送邀请",
                        sure: function () { sendInvitation(); }
                    });
                } else if (invitauth == 1) {
                    messageBox.alert({ content: '该用户已经是您的团队成员。' });
                } else if (invitauth == 2) {
                    messageBox.alert({ content: '该用户已加入别的团队，不能加入您的团队。' });
                } else if (invitauth == 3) {
                    messageBox.alert({ content: '您无权限为自己所在项目向用户发出邀请' });
                } else if (invitauth == 4) {
                    messageBox.alert({ content: '对方账户未通过人工审核不能被邀请。' });
                } else if (invitauth == 5) {
                    messageBox.alert({ content: '您首先应该属于某个团队才能邀请别人，您可以自己创建团队，或者先加入一个已经建立的团队。' });
                }
            });
        });
    </script>
